home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 301-325 / disk_319 / cnewssrc / cnews.orig.lzh / nntpdiffs / cdiff.1.5.0 next >
Text File  |  1989-06-27  |  6KB  |  246 lines

  1. Common subdirectories: ../nntp.1.5.0/common and ./common
  2. Common subdirectories: ../nntp.1.5.0/doc and ./doc
  3. Common subdirectories: ../nntp.1.5.0/inews and ./inews
  4. Only in .: nntp.1.5.C.diff
  5. Common subdirectories: ../nntp.1.5.0/rrnpatches and ./rrnpatches
  6. Common subdirectories: ../nntp.1.5.0/server and ./server
  7. Common subdirectories: ../nntp.1.5.0/support and ./support
  8. Common subdirectories: ../nntp.1.5.0/xfer and ./xfer
  9. Common subdirectories: ../nntp.1.5.0/xmit and ./xmit
  10. diff -r -c ../nntp.1.5.0/server/Makefile ./server/Makefile
  11. *** ../nntp.1.5.0/server/Makefile    Fri Feb 26 02:47:58 1988
  12. --- ./server/Makefile    Tue Jun  6 23:15:49 1989
  13. ***************
  14. *** 3,8 ****
  15. --- 3,9 ----
  16.   #
  17.   
  18.   SRVROBJ = main.o serve.o access.o access_inet.o access_dnet.o active.o \
  19. +     batch.o \
  20.       ahbs.o globals.o group.o help.o ihave.o list.o misc.o netaux.o \
  21.       newgroups.o newnews.o nextlast.o ngmatch.o post.o parsit.o scandir.o \
  22.       slave.o spawn.o strcasecmp.o subnet.o time.o xhdr.o fakesyslog.o \
  23. ***************
  24. *** 9,14 ****
  25. --- 10,16 ----
  26.       ../common/version.o
  27.   
  28.   SRVRSRC = main.c serve.c access.c access_inet.c access_dnet.c active.c \
  29. +     batch.c \
  30.       ahbs.c globals.c group.c help.c ihave.c list.c misc.c netaux.c \
  31.       newgroups.c newnews.c nextlast.c ngmatch.c post.c parsit.c scandir.c \
  32.       slave.c spawn.c strcasecmp.c subnet.c time.c xhdr.c fakesyslog.c \
  33. ***************
  34. *** 19,25 ****
  35.   SRCS    = ${SRVRSRC}
  36.   
  37.   # -ldbm here if you've #define'ed DBM in ../common/conf.h
  38. ! LIBS    =
  39.   
  40.   CFLAGS    = -O
  41.   
  42. --- 21,27 ----
  43.   SRCS    = ${SRVRSRC}
  44.   
  45.   # -ldbm here if you've #define'ed DBM in ../common/conf.h
  46. ! LIBS    = -ldbm
  47.   
  48.   CFLAGS    = -O
  49.   
  50. Only in ./server: batch.c
  51. diff -r -c ../nntp.1.5.0/server/ihave.c ./server/ihave.c
  52. *** ../nntp.1.5.0/server/ihave.c    Tue Jan 12 02:53:11 1988
  53. --- ./server/ihave.c    Tue Jun  6 23:15:52 1989
  54. ***************
  55. *** 43,49 ****
  56.           return;
  57.       }
  58.           
  59. !     retcode = spawn(rnews, "rnews", (char *) 0, CONT_XFER, ERR_XFERFAIL, errbuf)
  60.  
  61.       if (retcode <= 0)
  62.           printf("%d %s\r\n", ERR_XFERFAIL, errbuf);
  63.       else if (retcode > 0)
  64. --- 43,55 ----
  65.           return;
  66.       }
  67.           
  68. ! #ifdef UNBATCHED_INPUT
  69. !     retcode = spawn(rnews, "rnews", (char *) 0, CONT_XFER,
  70. !         ERR_XFERFAIL, errbuf);
  71. ! #else
  72. !     /* C news input hook */
  73. !     retcode = batch_input_article(CONT_XFER, ERR_XFERFAIL, errbuf);
  74. ! #endif
  75.       if (retcode <= 0)
  76.           printf("%d %s\r\n", ERR_XFERFAIL, errbuf);
  77.       else if (retcode > 0)
  78. diff -r -c ../nntp.1.5.0/server/misc.c ./server/misc.c
  79. *** ../nntp.1.5.0/server/misc.c    Sun Feb  7 01:29:33 1988
  80. --- ./server/misc.c    Tue Jun  6 23:15:54 1989
  81. ***************
  82. *** 82,88 ****
  83.    *
  84.    *    Side effects:    opens dbm database
  85.    *            (only once, keeps it open after that).
  86. -  *            Converts "msg_id" to lower case.
  87.    */
  88.   
  89.   #ifndef NDBM
  90. --- 82,87 ----
  91. ***************
  92. *** 115,124 ****
  93.       datum         key, content;
  94.   #endif USGHIST
  95.       static FILE    *hfp = NULL;    /* history file, text version */
  96. -     for (cp = msg_id; *cp != '\0'; ++cp)
  97. -         if (isupper(*cp))
  98. -             *cp = tolower(*cp);
  99.   
  100.   #ifdef USGHIST
  101.       hfp = fopen(histfile(msg_id), "r");
  102. --- 114,119 ----
  103. diff -r -c ../nntp.1.5.0/server/newnews.c ./server/newnews.c
  104. *** ../nntp.1.5.0/server/newnews.c    Sat Feb  6 20:29:07 1988
  105. --- ./server/newnews.c    Tue Jun  6 23:15:57 1989
  106. ***************
  107. *** 255,263 ****
  108.    *    Side effects:    Seeks in history file, modifies line.
  109.    */
  110.   
  111. ! seekuntil(fp, key, line, linesize)
  112.       FILE        *fp;
  113. !     char        *key;
  114.       char        *line;
  115.       int        linesize;
  116.   {
  117. --- 255,263 ----
  118.    *    Side effects:    Seeks in history file, modifies line.
  119.    */
  120.   
  121. ! seekuntil(fp, akey, line, linesize)
  122.       FILE        *fp;
  123. !     char        *akey;
  124.       char        *line;
  125.       int        linesize;
  126.   {
  127. ***************
  128. *** 264,270 ****
  129. --- 264,273 ----
  130.       char        datetime[32];
  131.       register int    c;
  132.       register long    top, bot, mid;
  133. +     extern long dtol();
  134. +     char key[30];
  135.   
  136. +     (void) sprintf(key, "%ld", dtol(akey));    /* akey -> time_t in ascii */
  137.       bot = 0;
  138.       (void) fseek(fp, 0L, 2);
  139.       top = ftell(fp);
  140. ***************
  141. *** 327,332 ****
  142. --- 330,338 ----
  143.   }
  144.   
  145.   
  146. + /*
  147. +  * C news version of getword.
  148. +  */
  149.   getword(fp, w, line, linesize)
  150.       FILE        *fp;
  151.       register char    *w;
  152. ***************
  153. *** 334,369 ****
  154.       int        linesize;
  155.   {
  156.       register char    *cp;
  157.   
  158.       if (fgets(line, linesize, fp) == NULL)
  159.           return (0);
  160. !     if (cp = index(line, '\t')) {
  161. ! /*
  162. !  * The following gross hack is present because the history file date
  163. !  * format is braindamaged.  They like "mm/dd/yy hh:mm", which is useless
  164. !  * for relative comparisons of dates using something like atoi() or
  165. !  * strcmp.  So, this changes their format into yymmddhhmm.  Sigh.
  166. !  *
  167. !  * 12345678901234    ("x" for cp[x])
  168. !  * mm/dd/yy hh:mm     (their lousy representation)
  169. !  * yymmddhhmm        (our good one)
  170. !  * 0123456789        ("x" for w[x])
  171. !  */
  172. !         *cp = '\0';
  173. !         (void) strncpy(w, cp+1, 15);
  174. !         w[0] = cp[7];        /* Years */
  175. !         w[1] = cp[8];
  176. !         w[2] = cp[1];        /* Months */
  177. !         w[3] = cp[2];
  178. !         w[4] = cp[4];        /* Days */
  179. !         w[5] = cp[5];
  180. !         w[6] = cp[10];        /* Hours */
  181. !         w[7] = cp[11];
  182. !         w[8] = cp[13];        /* Minutes */
  183. !         w[9] = cp[14];
  184. !         w[10] = '\0';
  185. !     } else
  186. !         w[0] = '\0';
  187.       return (1);
  188.   }
  189.   
  190. --- 340,362 ----
  191.       int        linesize;
  192.   {
  193.       register char    *cp;
  194. +     extern char *index();
  195.   
  196.       if (fgets(line, linesize, fp) == NULL)
  197.           return (0);
  198. !     w[0] = '\0';                /* in case of bad format */
  199. !     if (cp = index(line, '\t')) {        /* find 2nd field */
  200. !         register char *endp;
  201. !         *cp++ = '\0';
  202. !         endp = index(cp, '~');        /* end of date-received */
  203. !         if (endp == NULL)
  204. !             endp = index(cp, '\t');    /* end of expiry */
  205. !         if (endp != NULL) {
  206. !             (void) strncpy(w, cp, endp - cp);
  207. !             w[endp - cp] = '\0';
  208. !         }
  209. !     }
  210.       return (1);
  211.   }
  212.   
  213. diff -r -c ../nntp.1.5.0/server/serve.c ./server/serve.c
  214. *** ../nntp.1.5.0/server/serve.c    Thu Feb 25 22:49:21 1988
  215. --- ./server/serve.c    Tue Jun  6 23:16:00 1989
  216. ***************
  217. *** 237,244 ****
  218. --- 237,251 ----
  219.   
  220.       printf("%d %s closing connection.  Goodbye.\r\n", OK_GOODBYE, host);
  221.       (void) fflush(stdout);
  222. + #ifndef UNBATCHED_INPUT
  223. +     {
  224. +         char errbuf[2 * NNTP_STRLEN];
  225.   
  226. +         enqpartbatch(CONT_XFER, ERR_XFERFAIL, errbuf);
  227. +     }
  228. + #endif
  229.   
  230.   #ifdef LOG
  231.       if (ferror(stdout))
  232.           syslog(LOG_ERR, "%s disconnect: %m", hostname);
  233. ***************
  234. *** 287,293 ****
  235.   #ifdef PROFILE
  236.       profile();
  237.   #endif
  238.       exit(0);
  239.   }
  240.   
  241. --- 294,299 ----
  242.